﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace CsRedisTest.Interfaces
{
    public class MyUserData : IUserData
    {
        public MyUserData()
        {

        }
        public string Id { get; set; }

        public string Name { get; set; }

        public int Age { get; set; }
        public IAccountData Account { get; set; }

        public override string ToString()
        {
            return Id;
        }

        public static MyUserData New()
        {
            return new MyUserData()
            {
                Id = Guid.NewGuid().ToString(),
                Name = Guid.NewGuid().ToString().Split('-').First(),
                Age = Guid.NewGuid().ToByteArray().First(),
                Account = new MyAccount()
            };
         }
    }
}
